package Observer_Strategy;

/**
 * 具体观察者B
 */
public class ConcreteObserverB implements Observer{

    private String name;

    public ConcreteObserverB(String name) {
        this.name = name;
    }

    @Override
    public void update(double price) {
        System.out.println(name + " 收到股票价格更新：" + price);
    }
}
